<include file="Public/base"/>
<body>

    <nav class="breadcrumb">
        <i class="Hui-iconfont">&#xe67f;</i>首页
        <span class="c-gray en">&gt;</span>订单相关管理
        <span class="c-gray en">&gt;</span>订单管理
        <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px;margin-right:20px" href="javascript:location.replace(location.href);" title="刷新" >
            <i class="Hui-iconfont">&#xe68f;</i>
        </a>
    </nav>

    <div class="page-container pd-20">
        <div class="cl pd-5 bg-1 bk-gray mt-20">
            <!-- 高级搜索 -->
            <div class="search-form fr cf l">
                <div class="sleft">
                    <input type="text" name="order_id" id="order_id" value="{:I('order_id')}" class="search-input" placeholder="请输入订单编号">&nbsp;
                    <a class="sch-btn" href="javascript:;" id="search"><i class="Hui-iconfont btn-search">&#xe665;</i></a>
                </div>
            </div>
            <form action='/Admin/Saleman/Order/lists/key/ORDERLISTS.html' method='post' name='form1'>
               <div class="text-c">
                		<span class="select-box" style="width:150px">
                    <select class="select" size="1" name="state">
                       <volist name="state" id="vo">
                       <if condition='$currentState eq $key'> <option selected value="{$key}">{$vo}</option>
                       	<else/><option value="{$key}">{$vo}</option>
                       </if>
                            
                        </volist>
                    </select>              
                </span>
                <button type="submit" class="btn btn-success" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 点击查询</button>
              </div>
              </form> 
            <span class="r">共有数据：<strong>{$_total}</strong> 条</span>
        </div>
        <table class="table table-border table-bordered table-bg">
            <thead>
                <tr>
                    <th scope="col" colspan="11">订单列表</th>
                </tr>
                <tr class="text-c">
                    <th>订单编号</th>
                    <th >地址</th>
                    <th >发起人</th>
                    <th>接收人</th>
                    <th>总额(元)</th>
                    <th>订单状态</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
            <volist name="list" id="v">
                <tr class="text-c">
                    <td>{$v.id}</td>
                    <td>{$v.address}</td>
                    <td>{$v.send_name}</td>
                    <td>{$v.accept_name}</td>
                    <td>
                        {$v['total_price']}
                    </td>
                    <td>
                <if condition="$v['status'] eq 0">
                    待处理
                    <elseif condition="$v['status'] eq 1" />
                    已完成
                    <elseif condition="$v['status'] eq 2" />
                    退货
                    <else />
                    -
                </if>
                </td>
                <td class="td-manage">
                <if condition="isset($actions['ORDEREDIT'])">
                    <a title="查看详情" href="javascript:;" onclick="admin_edit('数据编辑', '<?php $str = $Think.ADMIN_PATH_NAME.$actions['ORDEREDIT']['url'];echo U($str,array('key'=>$actions['ORDEREDIT']['key'],'ad_id'=>$v['ad_id'],'id'=>$v['id']))?>', '1', '800', '500')" class="ml-5" style="text-decoration:none">
                        查看详情
                    </a> 
                </if>
                </td>
                </tr>
            </volist>
            </tbody>
        </table>
        <!-- 分页 -->
        <div class="page">
            {$page}
        </div>
       
    </div>
    <script type="text/javascript" src="__STATIC__/common/js/func.js"></script>
    <script type="text/javascript" src="__STATIC__/common/js/index.js"></script>
    <script type="text/javascript">
                        var search_obj = {order_id: 'order_id'};
                        var search_url = "{:U('',array('key'=>'ORDERLISTS'))}";
                        /*
                         参数解释：
                         title	标题
                         url		请求的url
                         id		需要操作的数据id
                         w		弹出层宽度（缺省调默认值）
                         h		弹出层高度（缺省调默认值）
                         */
                        /*管理员-增加*/
                        function admin_add(title, url, w, h) {
                            layer_show(title, url, w, h);
                        }
                        /*管理员-删除*/
                        function admin_del(obj, url) {
                            layer.confirm('确认要删除吗？', function (index) {
                                //此处请求后台程序，下方是成功后的前台处理……
                                layer.load(1, {
                                    shade: [0.1, '#fff'] //0.1透明度的白色背景
                                });
                                $.get(url, function (json) {
                                    layer.closeAll('loading');
                                    if (json.code == 1)
                                    {
                                        layer.closeAll();
                                        $(obj).parents("tr").remove();
                                        layer.msg('已删除!', {icon: 1, time: 1000});
                                    } else {
                                        layer.msg(json.msg);
                                    }
                                }, "json");
                            });
                        }
                        /*管理员-编辑*/
                        function admin_edit(title, url, id, w, h) {
                            layer_show(title, url, w, h);
                        }
    </script>
</body>
</html>
